gs-datasheet {
    display: block;
    height: 100%;
    min-height: 10em;
    
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
    
    display: -webkit-box;
    display: -moz-box;     /* OLD - iOS 6-, Safari 3.1-6 */
    display: -ms-flexbox;  /* OLD - Firefox 19- (buggy but mostly works) */
    display: -webkit-flex; /* TWEENER - IE 10 */
    display: flex;         /* NEW - Chrome */
    
    flex-direction: column;
    -ms-flex-direction: column;
    -webkit-flex-direction: column;
}

gs-datasheet[flex] {
    height: auto;
}

gs-datasheet > .root {
    width: 100%;
    height: 100%;
    
    -webkit-box-flex: 1; /* OLD - iOS 6-, Safari 3.1-6 */
    -moz-box-flex: 1;    /* OLD - Firefox 19- */
    width: 100%;         /* For old syntax, otherwise collapses. */
    -webkit-flex: 1;     /* Chrome */
    -ms-flex: 1;         /* IE 10 */
    flex: 1;             /* NEW, Spec - Opera 12.1, Firefox 20+ */
}

gs-datasheet > .root > .data-container {
    border: 1px solid #006e00;
    position: relative;
    
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}
gs-datasheet > .root > .data-container > .data-flex-reset {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
}


gs-datasheet > .root > .data-container > .data-flex-reset > .header-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .header-container,
gs-datasheet > .root > .data-container > .data-flex-reset > .header-container tr {
    background-color: #FFF;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .header-container.shadow {
    -webkit-box-shadow: 0 0.05em 0.5em 0 #AAAAAA;
            box-shadow: 0 0.05em 0.5em 0 #AAAAAA;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .header-container.scroll {
    overflow-y: scroll;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .scroll-container {
    overflow: auto;
    width: 100%;
    height: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .insert-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    background-color: #F9F9F9;
}


gs-datasheet table {
    border: 0 none;
    table-layout: fixed;
}

gs-datasheet .floating-button-container {
    display: inline-block;
    position: fixed;
    opacity: 0.2;
}

gs-datasheet .floating-button-container:hover {
    opacity: 1;
}

gs-datasheet .hud-container gs-button {
    border-bottom: 0 none;
    border-color: #006E00;
    color: #0e7171;
    
    margin-left: 0.5em;
    float: left;
    display: inline-block;
    /*border-bottom-right-radius: 0;*/
    /*border-bottom-left-radius: 0;*/
    
    
    -webkit-font-smoothing: antialiased;
    -moz-font-smoothing: antialiased;
    -ms-font-smoothing: antialiased;
    -o-font-smoothing: antialiased;
    font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

gs-datasheet .hud-container gs-button[remove-left] {
    border-left: 0 none;
    margin-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

gs-datasheet .hud-container gs-button[remove-right] {
    border-right: 0 none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

gs-datasheet .hud-container gs-button:first-child {
    margin-left: 0;
}











gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container {
    padding: 3em 1em 0 1em;
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table {
    display: block;
    background-color: transparent;
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > thead,
gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .header-container {
    display: none;
    
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody {
    display: block;
    
    min-width: 0 !important;
    width: 100% !important;
    
    border: 0 none;
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody > tr {
    display: block;
    
    min-width: 0 !important;
    width: 100% !important;
    
    margin-bottom: 3em;
    border: 1px solid #000000;
    
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody > tr > th,
gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody > tr > td {
    display: block;
    
    min-width: 0 !important;
    width: 100% !important;
    
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody > tr > th:not(:first-child):before,
gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody > tr > td:before {
    display: block;
    
    /*text-align: center;*/
    font-weight: 900;
    
    content: attr(heading);
}

gs-datasheet > .root > .data-container.grid-reflow > .data-flex-reset > .scroll-container > table > tbody > tr > th:first-child {
    font-size: 2em;
}


/* ###############################################################
   ########################## TEXTAREAS ##########################
   ############################################################### */
/*
gs-datasheet table textarea {
    display: block;
    resize: none;
    width: 100%;
    border: 0 none;
    cursor: text;
    padding: 0 0.1em;
    height: 1.4em;
    
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    -o-box-sizing: border-box;
    box-sizing: border-box;
}*/

gs-datasheet textarea.hidden-focus-control {
    width: 1px;
    height: 1px;
    border: 0 none;
    margin: 0;
    padding: 0;
    
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: -5000;
    opacity: 0.00000001;
    
    -webkit-appearance: none;
    -moz-appearance: none;
}


/* ###############################################################
   ############################ CELLS ############################
   ############################################################### */

gs-datasheet table thead th {
    border-top: 0 none;
    width: 12em;
    /*
    background: #006e00;
    background: -moz-linear-gradient(top,  #006e00 0%, #3c9640 100%);
    background: -webkit-linear-gradient(top,  #006e00 0%,#3c9640 100%);
    background: linear-gradient(to bottom,  #006e00 0%,#3c9640 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#006e00', endColorstr='#3c9640',GradientType=0 );*/
}
gs-datasheet table tbody th {
    /*border-top: 0 none;*/
    width: 12em;
    /*
    background: #006e00;
    background: -moz-linear-gradient(left,  #006e00 0%, #3c9640 100%);
    background: -webkit-linear-gradient(left,  #006e00 0%,#3c9640 100%);
    background: linear-gradient(to right,  #006e00 0%,#3c9640 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#006e00', endColorstr='#3c9640',GradientType=1 );*/
}
/*
gs-datasheet table thead th:first-child {
    background: #006e00;
    background: -moz-linear-gradient(-45deg,  #006e00 0%, #3c9640 100%);
    background: -webkit-linear-gradient(-45deg,  #006e00 0%,#3c9640 100%);
    background: linear-gradient(135deg,  #006e00 0%,#3c9640 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#006e00', endColorstr='#3c9640',GradientType=1 );
}

gs-datasheet table th,
gs-datasheet table th b {
    color: #F0F0F0;
    font-weight: normal;
}

gs-datasheet table tbody th[selected] {
    border-bottom: 2px solid #FFFFCC;
}

gs-datasheet table thead th[selected] {
    border-right: 2px solid #FFFFCC;
}
*/

gs-datasheet th,
gs-datasheet td {
    padding: 0.15em 0.2em;
    cursor: pointer;
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

gs-datasheet th {
    position: relative;
}


gs-datasheet th, gs-datasheet td {
    vertical-align: top;
}

gs-datasheet th:first-child {
    vertical-align: middle;
}

gs-datasheet tbody th:first-child {
    color: #CCC;
}


gs-datasheet thead th {
    cursor: s-resize;
    overflow: hidden;
    width: 150px;
    padding: 0.5em 0 0.5em 0;
}

gs-datasheet thead tr {
    border-bottom: 2px solid #999;
}

gs-datasheet thead th:first-child {
    cursor: se-resize;
}

gs-datasheet tbody th {
    cursor: e-resize;
}

gs-datasheet .data-flex-reset > .scroll-container > table > tbody > tr > [not-editable] {
    background-color: #ececec;
}

gs-datasheet .data-flex-reset > .scroll-container > table > tbody > tr:nth-child(odd) > [not-editable] {
    background-color: #e4e3e3;
}

gs-datasheet .data-flex-reset > .scroll-container > table > tbody > tr > [selected][not-editable] {
    background-color: #59C4FD !important;
}

gs-datasheet .data-flex-reset > .scroll-container > table > tbody > tr:nth-child(odd) > [selected][not-editable] {
    background-color: #59C4FD !important;
}

gs-datasheet .data-flex-reset > .scroll-container > table > tbody > tr:nth-child(odd) > [selected] {
    background-color: #84D4FF !important;
}


/* ################################################################
   ######################### STATE COLORS #########################
   ################################################################ */

gs-datasheet > .root > .data-container > .data-flex-reset > .scroll-container > table > tbody > tr.bg-red > * {
    background-color: #FF9090 !important;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .scroll-container > table > tbody > tr.bg-amber > * {
    background-color: #FFDEA0 !important;
}

gs-datasheet > .root > .data-container > .data-flex-reset > .scroll-container > table > tbody > tr.bg-green-fade > * {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
    
    -webkit-animation-timing-function: ease-out;
    animation-timing-function: ease-out;
    
    -webkit-animation-name: effect-green-fade;
    animation-name: effect-green-fade;
}

/* ############## effect-green-fade ############## */
@-webkit-keyframes effect-green-fade {
    0%   {
        background-color: #90FF90;
    }
    100% {
        background-color: transparent;
    }
}
@keyframes effect-green-fade {
    0%   {
        background-color: #90FF90;
    }
    100% {
        background-color: transparent;
    }
}
